package nave.android.game;

import java.awt.Point;
import java.awt.geom.Point2D;

import nave.android.framework.Graphics;

public class Laser extends AnimatedObject{
	
	
	boolean ligado = true;
	int contador;
	final int tempoMax = 10;
	
	public Laser(Asset imagem, Point2D p,Point2D d)
	{
		super(imagem, p, d, new Point2D.Double(0,0), new Point2D.Double(d.getX()/2,d.getY()), 1, new Point(1,2), false);	
		
	}
	public void Update()
	{
		contador ++;
		if(contador >= 10){
			contador = 0;
			ligado = !ligado;
		}
		
	}
	public void Draw(Graphics g)
	{
		if(ligado)
		super.draw(g);
	}
}
